<?

/**
* insert into pch-order sub dtl
*
* @param  string  $COracle
* @param  string  $values
* @param  string  $srcDb
*
*/ 
function insToDbSubDtlPchOrder(&$COracle,
                               &$values,
                               &$srcDb){

  $query = "INSERT INTO ".$srcDb." 
            (JOB_ID,
             ICAT,
             IGROUP,
             MODEL,
             MODEL_ID,
             UNIT,
             QTY,
             CVT_TO,
             CVT_QTY,
             RECV_QTY,
             PRICE,
             HRZ_TOT,
             NO)
            VALUES (".$values.") ";
  
  $COracle->execQuery($query);
}

/**
* insert into pch-order dtl
*
* @param  string  $COracle
* @param  string  $values
* @param  string  $srcDb
*
*/ 
function insToDbDtlPchOrder(&$COracle,
                            &$values,
                            &$srcDb){
  
  $query  = "INSERT INTO ".$srcDb." 
             (JOB_ID,
              TOT_QTY,
              TOT_CVT_QTY,
              GRAND_TOT)
              VALUES (".$values.") ";
  
  $COracle->execQuery($query);
}

/**
* insert into pch-order hdr
* 
* @param  string  $COracle
* @param  string  $values
* @param  string  $srcDb
*
*/
function insToDbHdrPchOrder(&$COracle,
                            &$values,
                            &$srcDb){

  $query  = "INSERT INTO ".$srcDb." 
             (JOB_ID,
              REFERENCE,
              TR_DATE,
              SUPPLIER,
              CURRENCY,
              RATE,
              MEMO,
              NO,
              STATUS)
             VALUES (".$values.") ";
  
  $COracle->execQuery($query);
}


?>